#version 330 core
layout (location = 0) in vec4 vertex; // <vec2 position, vec2 texCoords>

out vec2 TexCoords;

uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
uniform int needFlipV;
uniform int needFlipH;

void main()
{

    TexCoords = vec2((needFlipH == 1?(1 - vertex.z):vertex.z), (needFlipV == 1?(1 - vertex.w):vertex.w));
    gl_Position = projection * view * model * vec4(vertex.xy, 0.0, 1.0);
}
